﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using AdvMultiColumnComboCode;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_BaoNoNganHang : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvNganhang")]
        private ADVObjects _AdvNganhang;
        [AccessedThroughProperty("AdvTaiKhoan")]
        private ADVAccount _AdvTaiKhoan;
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTab2")]
        private C1DockingTab _C1DockingTab2;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("C1DockingTabPage2")]
        private C1DockingTabPage _C1DockingTabPage2;
        [AccessedThroughProperty("C1DockingTabPage3")]
        private C1DockingTabPage _C1DockingTabPage3;
        [AccessedThroughProperty("C1DockingTabPage4")]
        private C1DockingTabPage _C1DockingTabPage4;
        [AccessedThroughProperty("CboLoaiDuLieu")]
        private ComboBox _CboLoaiDuLieu;
        [AccessedThroughProperty("CboLoaiHoaDon")]
        private MultiColumnComboBox _CboLoaiHoaDon;
        [AccessedThroughProperty("CboLoaiTien")]
        private ComboBox _CboLoaiTien;
        [AccessedThroughProperty("CmdAdd")]
        private ToolStripButton _CmdAdd;
        [AccessedThroughProperty("CmdAddChungTu")]
        private Button _CmdAddChungTu;
        [AccessedThroughProperty("CmdAddRow")]
        private Button _CmdAddRow;
        [AccessedThroughProperty("CmdChuyen")]
        private Button _CmdChuyen;
        [AccessedThroughProperty("CmdDel")]
        private ToolStripButton _CmdDel;
        [AccessedThroughProperty("CmdDelRow")]
        private Button _CmdDelRow;
        [AccessedThroughProperty("CmdEdit")]
        private ToolStripButton _CmdEdit;
        [AccessedThroughProperty("CmdExit")]
        private ToolStripButton _CmdExit;
        [AccessedThroughProperty("CmdFind")]
        private ToolStripButton _CmdFind;
        [AccessedThroughProperty("CmdHelp")]
        private ToolStripButton _CmdHelp;
        [AccessedThroughProperty("CmdPrint")]
        private ToolStripSplitButton _CmdPrint;
        [AccessedThroughProperty("CmdSave")]
        private ToolStripButton _CmdSave;
        [AccessedThroughProperty("CmdUnsave")]
        private ToolStripButton _CmdUnsave;
        [AccessedThroughProperty("ImageList1")]
        private ImageList _ImageList1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label10")]
        private Label _Label10;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label17")]
        private Label _Label17;
        [AccessedThroughProperty("Label18")]
        private Label _Label18;
        [AccessedThroughProperty("Label19")]
        private Label _Label19;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label9")]
        private Label _Label9;
        [AccessedThroughProperty("mnGiayBaoNo")]
        private ToolStripMenuItem _mnGiayBaoNo;
        [AccessedThroughProperty("mnUyNhiemChi")]
        private ToolStripMenuItem _mnUyNhiemChi;
        [AccessedThroughProperty("Panel4")]
        private Panel _Panel4;
        [AccessedThroughProperty("Panel5")]
        private Panel _Panel5;
        [AccessedThroughProperty("PNDungChung")]
        private Panel _PNDungChung;
        [AccessedThroughProperty("ToolStrip1")]
        private ToolStrip _ToolStrip1;
        [AccessedThroughProperty("ToolStripButton1")]
        private ToolStripSeparator _ToolStripButton1;
        [AccessedThroughProperty("ToolStripSeparator1")]
        private ToolStripSeparator _ToolStripSeparator1;
        [AccessedThroughProperty("ToolStripSeparator2")]
        private ToolStripSeparator _ToolStripSeparator2;
        [AccessedThroughProperty("ToolStripSeparator3")]
        private ToolStripSeparator _ToolStripSeparator3;
        [AccessedThroughProperty("TxtChungTuDinhKem")]
        private TextBox _TxtChungTuDinhKem;
        [AccessedThroughProperty("TxtDiaChi")]
        private TextBox _TxtDiaChi;
        [AccessedThroughProperty("TxtDienGiai")]
        private TextBox _TxtDienGiai;
        [AccessedThroughProperty("TxtNgayChungTu")]
        private DateTimePicker _TxtNgayChungTu;
        [AccessedThroughProperty("TxtNgayHoaDon")]
        private DateTimePicker _TxtNgayHoaDon;
        [AccessedThroughProperty("TxtNguoiNhan")]
        private TextBox _TxtNguoiNhan;
        [AccessedThroughProperty("TxtSoChungTu")]
        private TextBox _TxtSoChungTu;
        [AccessedThroughProperty("TxtSoCMND")]
        private TextBox _TxtSoCMND;
        [AccessedThroughProperty("TxtSoTien")]
        private C1NumericEdit _TxtSoTien;
        [AccessedThroughProperty("TxtSoTienNT")]
        private C1NumericEdit _TxtSoTienNT;
        [AccessedThroughProperty("txtTyGia")]
        private C1NumericEdit _txtTyGia;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        public string cFrmFormat;
        public string cFrmKhoa;
        private string cFrmKhoaOld;
        private string cFrmTask;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private bool mEnabledControl;
        private string mLoaiChungTu;
        private clsChungTuQuy objBN;
        private clsChungTuQuyChiTiet objBNCT;
        private clsSoChungTu objSoCT;

        public Frm_BaoNoNganHang()
        {
            base.KeyDown += new KeyEventHandler(this.Frm_PhieuThu_KeyDown);
            base.Load += new EventHandler(this.Frm_PhieuThu_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.mLoaiChungTu = "BNNH";
            this.cFrmKhoa = "";
            this.cFrmKhoaOld = "";
            this.objSoCT = new clsSoChungTu();
            this.objBN = new clsChungTuQuy();
            this.objBNCT = new clsChungTuQuyChiTiet();
            this.cFrmTask = "";
            this.InitializeComponent();
        }

        public void AddHoaDon(string pKhoaTK, string pSoTK, string pKhoaChungTu, string pSoChungTu, string pSoHoaDon, string pLoaiTien, double pTyGia, string pKhoaDT, string pTenDT, double pSoTien)
        {
            if (!this.SearchThamChieu(pKhoaChungTu))
            {
                C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                vSlist.AddItem("");
                vSlist[vSlist.Rows.Count - 1, 1] = pKhoaTK;
                vSlist[vSlist.Rows.Count - 1, 2] = pSoTK;
                vSlist[vSlist.Rows.Count - 1, 3] = "NO";
                vSlist[vSlist.Rows.Count - 1, 4] = pKhoaDT;
                vSlist[vSlist.Rows.Count - 1, 5] = pTenDT;
                vSlist[vSlist.Rows.Count - 1, 6] = pKhoaChungTu;
                if (LVYModule.ReturnIfNull(pSoHoaDon, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    vSlist[vSlist.Rows.Count - 1, 7] = pSoChungTu;
                }
                else
                {
                    vSlist[vSlist.Rows.Count - 1, 7] = pSoHoaDon;
                }
                if (this.CboLoaiTien.SelectedValue.ToString().Trim() == pLoaiTien.Trim())
                {
                    vSlist[vSlist.Rows.Count - 1, 8] = pSoTien;
                    vSlist[vSlist.Rows.Count - 1, 9] = pSoTien * Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                }
                else
                {
                    vSlist[vSlist.Rows.Count - 1, 8] = (pSoTien * pTyGia) / Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                    vSlist[vSlist.Rows.Count - 1, 9] = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[vSlist.Rows.Count - 1, 8]), 0, modGeneral.TypeOfValue.Nothing)) * Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                }
                vSlist[vSlist.Rows.Count - 1, 0x20] = Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(modGeneral.Tranlated("Thanh to\x00e1n h\x00f3a đơn:", ""), Interaction.IIf(LVYModule.ReturnIfNull(pSoHoaDon, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "", pSoChungTu, pSoHoaDon));
                vSlist = null;
                this.TotalOfVoucher();
            }
        }

        private void AdvTaiKhoan_ValueChanged(object sender, EventArgs e)
        {
            clsDMTaiKhoan khoan = new clsDMTaiKhoan();
            if (khoan.Load(this.AdvTaiKhoan.Value))
            {
                this.CboLoaiTien.SelectedValue = khoan.LoaiTien;
                this.CboLoaiTien_SelectedIndexChanged(RuntimeHelpers.GetObjectValue(sender), e);
            }
        }

        private void C1DockingTab1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int num;
            int num3;
            switch (this.C1DockingTab1.SelectedIndex)
            {
                case 0:
                {
                    C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                    vSlist.Cols[2].Visible = true;
                    vSlist.Cols[3].Visible = false;
                    vSlist.Cols[5].Visible = true;
                    vSlist.Cols[7].Visible = false;
                    vSlist.Cols[8].Visible = true;
                    vSlist.Cols[9].Visible = true;
                    vSlist.Cols[0x1d].Visible = true;
                    vSlist.Cols[30].Visible = false;
                    vSlist.Cols[0x1f].Visible = false;
                    vSlist.Cols[0x20].Visible = true;
                    num = 11;
                    do
                    {
                        vSlist.Cols[num].Visible = false;
                        num++;
                        num3 = 0x1d;
                    }
                    while (num <= num3);
                    vSlist.Select();
                    if (vSlist.Rows.Count != 1)
                    {
                        vSlist.Select(vSlist.Rows.Count - 1, 2);
                        vSlist = null;
                    }
                    break;
                }
                case 1:
                {
                    C1.Win.C1FlexGrid.C1FlexGrid grid2 = this.VSlist;
                    num = 1;
                    do
                    {
                        grid2.Cols[num].Visible = false;
                        num++;
                        num3 = 10;
                    }
                    while (num <= num3);
                    grid2.Cols[11].Visible = true;
                    grid2.Cols[12].Visible = false;
                    grid2.Cols[13].Visible = true;
                    grid2.Cols[14].Visible = true;
                    grid2.Cols[15].Visible = false;
                    grid2.Cols[0x10].Visible = true;
                    grid2.Cols[0x11].Visible = true;
                    grid2.Cols[0x12].Visible = true;
                    grid2.Cols[0x13].Visible = false;
                    grid2.Cols[20].Visible = true;
                    grid2.Cols[0x15].Visible = true;
                    grid2.Cols[0x16].Visible = true;
                    grid2.Cols[0x17].Visible = true;
                    grid2.Cols[0x1f].Visible = false;
                    num = 0x18;
                    do
                    {
                        grid2.Cols[num].Visible = false;
                        num++;
                        num3 = 0x20;
                    }
                    while (num <= num3);
                    grid2.Select();
                    if (this.VSlist.Rows.Count != 1)
                    {
                        grid2.Select(this.VSlist.Rows.Count - 1, 11);
                        grid2 = null;
                    }
                    break;
                }
                case 2:
                {
                    C1.Win.C1FlexGrid.C1FlexGrid grid3 = this.VSlist;
                    num = 1;
                    do
                    {
                        grid3.Cols[num].Visible = false;
                        num++;
                        num3 = 0x17;
                    }
                    while (num <= num3);
                    grid3.Cols[2].Visible = true;
                    grid3.Cols[3].Visible = false;
                    grid3.Cols[8].Visible = true;
                    grid3.Cols[9].Visible = true;
                    grid3.Cols[0x19].Visible = true;
                    grid3.Cols[0x1b].Visible = true;
                    grid3.Cols[0x1d].Visible = true;
                    grid3.Cols[30].Visible = false;
                    grid3.Cols[0x1f].Visible = false;
                    grid3.Cols[0x20].Visible = false;
                    grid3.Select();
                    if (this.VSlist.Rows.Count != 1)
                    {
                        grid3.Select(this.VSlist.Rows.Count - 1, 0x19);
                        grid3 = null;
                    }
                    break;
                }
            }
        }

        private void CboLoaiHoaDon_DropDownClosed(object sender, EventArgs e)
        {
            this.VSlist.Focus();
        }

        private void CboLoaiTien_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                this.txtTyGia.Value = 0;
            }
            else
            {
                string strCode = this.CboLoaiTien.SelectedValue.ToString();
                if (strCode != "System.Data.DataRowView")
                {
                    clsDMLoaiTien tien = new clsDMLoaiTien();
                    tien.LoadByCode(strCode);
                    if (tien.SoLe > 0)
                    {
                        this.cFrmFormat = modGeneral.H_FORMATNUMBER + "." + LVYModule.sRight("0000000000", tien.SoLe);
                    }
                    if (tien.TienViet == 1)
                    {
                        this.txtTyGia.Enabled = false;
                    }
                    else
                    {
                        this.txtTyGia.Enabled = true;
                    }
                    this.txtTyGia.Value = tien.TyGia;
                    this.FormatNumber();
                }
            }
        }

        public bool CheckIvalid()
        {
            if (!LVYModule.CheckDateLock(LVYModule.Date2Char(this.TxtNgayChungTu.Text)))
            {
                return false;
            }
            if (this.TxtSoChungTu.Text.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số chứng từ!", ""));
                this.TxtSoChungTu.Focus();
                return false;
            }
            if (this.objBN.IsDuplicateVoucherNo(this.TxtSoChungTu.Text.Trim(), this.cFrmKhoa))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Số chứng từ n\x00e0y đ\x00e3 tồn tại, bạn phải nhập số chứng từ kh\x00e1c!", ""));
                this.TxtSoChungTu.Focus();
                return false;
            }
            if (this.AdvTaiKhoan.Value.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số t\x00e0i khoản!", ""));
                this.AdvTaiKhoan.Focus();
                return false;
            }
            if (this.AdvNganhang.Value.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập ng\x00e2n h\x00e0ng giao dịch!", ""));
                this.AdvNganhang.Focus();
                return false;
            }
            if (this.TxtDienGiai.Text.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập diễn giải của chứng từ!", ""));
                this.TxtDienGiai.Focus();
                return false;
            }
            if (Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtSoTienNT.Value), 0, modGeneral.TypeOfValue.Nothing)) == 0.0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số tiền ph\x00e1t sinh!", ""));
                this.CmdAddRow.Focus();
                return false;
            }
            if (!this.CheckIvalidGrid())
            {
                return false;
            }
            if (!this.CheckLoaiTien())
            {
                return false;
            }
            return true;
        }

        public bool CheckIvalidGrid()
        {
            clsDMTaiKhoan khoan = new clsDMTaiKhoan();
            if (this.VSlist.Rows.Count == 1)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập c\x00e1c d\x00f2ng ph\x00e1t sinh chi tiết!", ""));
                return false;
            }
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    if (Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 8]), 0, modGeneral.TypeOfValue.Nothing)) == 0.0)
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số tiền ph\x00e1t sinh theo t\x00e0i khoản:", "") + " " + this.VSlist[i, 2].ToString().Trim());
                        return false;
                    }
                    khoan.Load(Conversions.ToString(this.VSlist[i, 1]));
                    if ((khoan.CongNo == 1) && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 4]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == ""))
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập đối tượng để ghi c\x00f4ng nợ!", "") + this.VSlist[i, 2].ToString().Trim());
                        return false;
                    }
                    if ((khoan.DoiTuongNganHang == 1) && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 4]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == ""))
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập ng\x00e2n h\x00e0ng để ghi tồn quỹ!", "") + this.VSlist[i, 2].ToString().Trim());
                        return false;
                    }
                }
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 11]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 13]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập đối tượng thuế!", ""));
                        return false;
                    }
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 14]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập m\x00e3 số thuế!", ""));
                        return false;
                    }
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x10]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập k\x00fd hiệu thuế!", ""));
                        return false;
                    }
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x11]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số h\x00f3a đơn!", ""));
                        return false;
                    }
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x12]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập ng\x00e0y h\x00f3a đơn!", ""));
                        return false;
                    }
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 20]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập loại thuế!", ""));
                        return false;
                    }
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x15]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập thuế suất!", ""));
                        return false;
                    }
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x16]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số tiền thuế giao dịch!", ""));
                        return false;
                    }
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x17]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số tiền thuế ghi sổ!", ""));
                        return false;
                    }
                }
            }
            return true;
        }

        public bool CheckLoaiTien()
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải chọn loại tiền hạch to\x00e1n", ""));
                return false;
            }
            if (!LVYModule.CheckValidCurrency(this.AdvTaiKhoan.Value.Trim(), this.CboLoaiTien.SelectedValue.ToString().Trim()))
            {
                return false;
            }
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (!LVYModule.CheckValidCurrency(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim(), this.CboLoaiTien.SelectedValue.ToString().Trim()))
                {
                    return false;
                }
            }
            return true;
        }

        private void CmdAdd_Click(object sender, EventArgs e)
        {
            if (this.cFrmKhoa.Trim() != "")
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
            }
            this.EmptyData();
            this.cFrmKhoa = modGeneral.CreatKey("GL_BaoNo", 15, "BN");
            this.objSoCT.Load(this.mLoaiChungTu);
            this.TxtSoChungTu.Text = this.objSoCT.CreateVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6), 1);
            this.AdvTaiKhoan.Value = LVYModule.ReturnIfNull(modGeneral.H_ACCNORECEIPTNOTE, "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
            this.EnabledControl = true;
            this.TxtSoChungTu.Focus();
            this.InitDefault();
            this.cFrmTask = "I";
        }

        private void CmdAddChungTu_Click(object sender, EventArgs e)
        {
            if (this.AdvTaiKhoan.Value.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số t\x00e0i khoản trước!", ""));
                this.AdvTaiKhoan.Focus();
            }
            else
            {
                MyProject.Forms.Frm_AddThanhToanMuaHang.objFrmCall = this;
                MyProject.Forms.Frm_AddThanhToanMuaHang.cFrmKhoa = this.cFrmKhoa;
                MyProject.Forms.Frm_AddThanhToanMuaHang.TxtNgayChungTu.Text = this.TxtNgayChungTu.Text;
                MyProject.Forms.Frm_AddThanhToanMuaHang.ShowDialog();
                if (((this.VSlist.Rows.Count > 1) && (this.TxtDiaChi.Text.Trim() == "")) && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[1, 4]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != ""))
                {
                    clsDMDoiTuong tuong = new clsDMDoiTuong();
                    tuong.Load(Conversions.ToString(this.VSlist[1, 4]));
                    if (tuong.Loai == "E")
                    {
                        if (modGeneral.H_LANGUAGE == "VIET")
                        {
                            this.TxtDiaChi.Text = modGeneral.H_COMPANYNAMEVIET;
                        }
                        else
                        {
                            this.TxtDiaChi.Text = modGeneral.H_COMPANYNAMEANH;
                        }
                    }
                    else if (modGeneral.H_LANGUAGE == "VIET")
                    {
                        this.TxtDiaChi.Text = tuong.TenViet;
                    }
                    else
                    {
                        this.TxtDiaChi.Text = tuong.TenAnh;
                    }
                }
            }
        }

        private void CmdAddRow_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.AdvTaiKhoan.Value, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p số t\x00e0i khoản trước!", ""));
                this.AdvTaiKhoan.Focus();
            }
            else if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p loại ti\x00eàn và tỷ giá!", ""));
                this.CboLoaiTien.Focus();
            }
            else if (LVYModule.ReturnIfNull(this.AdvNganhang.Value, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải chọn ng\x00e2n h\x00e0ng!", ""));
                this.CboLoaiTien.Focus();
            }
            else if ((this.VSlist.Rows.Count <= 1) || (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Rows.Count - 1, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != ""))
            {
                this.VSlist.AddItem("");
                this.VSlist.Select(this.VSlist.Rows.Count - 1, 2);
                this.VSlist.Focus();
                this.VSlist[this.VSlist.Rows.Count - 1, 30] = this.TxtDienGiai.Text.Trim();
            }
        }

        private void CmdDel_Click(object sender, EventArgs e)
        {
            if (((this.cFrmKhoa != "") && LVYModule.CheckDateLock(LVYModule.Date2Char(this.TxtNgayChungTu.Text))) && (LVYModule.ConfirmDelete("") && this.objBN.DeleteData(this.cFrmKhoa, 1)))
            {
                this.EmptyData();
            }
        }

        private void CmdDelRow_Click(object sender, EventArgs e)
        {
            if ((this.VSlist.Rows.Count != 1) && (this.VSlist.Row > 0))
            {
                this.VSlist.RemoveItem(this.VSlist.Row);
            }
        }

        private void CmdEdit_Click(object sender, EventArgs e)
        {
            this.cFrmKhoaOld = this.cFrmKhoa;
            this.cFrmTask = "U";
            this.EnabledControl = true;
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdFind_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_BaoNoNganHangList.Show();
            MyProject.Forms.Frm_BaoNoNganHangList.BringToFront();
        }

        private void CmdPrint_ButtonClick(object sender, EventArgs e)
        {
            if (this.cFrmKhoa.ToString().Trim() != "")
            {
                ReportModule.PrintGiayBaoNo(this.cFrmKhoa);
            }
        }

        private void CmdSave_Click(object sender, EventArgs e)
        {
            if (this.CheckIvalid())
            {
                if (!this.SaveDetailsTemp())
                {
                    this.objBN.ClearTemp(this.cFrmKhoa);
                }
                else if (!this.UpdateData())
                {
                    this.objBN.ClearTemp(this.cFrmKhoa);
                }
                else
                {
                    this.objBN.ClearTemp(this.cFrmKhoa);
                    this.EnabledControl = false;
                    this.cFrmTask = "";
                }
            }
        }

        private void CmdUnsave_Click(object sender, EventArgs e)
        {
            if (this.cFrmKhoaOld.Trim() != "")
            {
                this.cFrmKhoa = this.cFrmKhoaOld;
                this.ShowData(this.cFrmKhoa);
            }
            else
            {
                this.EmptyData();
            }
            if (this.cFrmTask == "I")
            {
                this.objSoCT.UndoVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6));
            }
            this.cFrmTask = "";
            this.EnabledControl = false;
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void EmptyData()
        {
            this.TxtSoChungTu.Text = "";
            this.TxtNgayChungTu.Text = Strings.Format(DateAndTime.Today, "dd/MM/yyyy");
            this.CboLoaiTien.SelectedValue = "";
            this.txtTyGia.Value = 0;
            this.TxtDienGiai.Text = "";
            this.TxtNguoiNhan.Text = "";
            this.TxtDiaChi.Text = "";
            this.TxtSoCMND.Text = "";
            this.TxtChungTuDinhKem.Text = "";
            this.AdvTaiKhoan.Value = "";
            this.VSlist.Rows.Count = 1;
        }

        public void FillDoiTuongThue(string pKhoaDT, int nRow)
        {
            clsDMDoiTuong tuong = new clsDMDoiTuong();
            if (tuong.Load(pKhoaDT))
            {
                this.VSlist[nRow, 12] = tuong.Khoa;
                if (modGeneral.H_LANGUAGE == "VIET")
                {
                    this.VSlist[nRow, 13] = tuong.TenViet;
                }
                else
                {
                    this.VSlist[nRow, 13] = tuong.TenAnh;
                }
                this.VSlist[nRow, 14] = tuong.MaSoThue;
                this.VSlist[nRow, 15] = tuong.DiaChi;
            }
        }

        public void FormatNumber()
        {
            string strFormat = "###,###,###,###,###,###,##0.00";
            LVYModule.advFormatNumber(this.txtTyGia, strFormat);
            LVYModule.advFormatNumber(this.TxtSoTienNT, strFormat);
            LVYModule.advFormatNumber(this.TxtSoTien, strFormat);
        }

        private void Frm_PhieuThu_KeyDown(object sender, KeyEventArgs e)
        {
            Keys keyCode = e.KeyCode;
            if (keyCode != Keys.ControlKey)
            {
                if (keyCode == Keys.Escape)
                {
                    if (this.CmdExit.Enabled)
                    {
                        this.CmdExit_Click(RuntimeHelpers.GetObjectValue(sender), e);
                    }
                }
                else if (keyCode == Keys.F2)
                {
                    if (this.CmdEdit.Enabled)
                    {
                        this.CmdEdit_Click(RuntimeHelpers.GetObjectValue(sender), e);
                    }
                }
                else if (keyCode == Keys.F3)
                {
                    this.CmdFind_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
                else if (keyCode == Keys.F5)
                {
                    this.C1DockingTab1.SelectedIndex = 0;
                }
                else if (keyCode == Keys.F6)
                {
                    this.C1DockingTab1.SelectedIndex = 1;
                }
                else if (keyCode == Keys.F7)
                {
                    this.C1DockingTab1.SelectedIndex = 2;
                }
                else if (keyCode == Keys.F8)
                {
                    if (this.CmdAdd.Enabled)
                    {
                        this.CmdAdd_Click(RuntimeHelpers.GetObjectValue(sender), e);
                    }
                }
                else if (keyCode == Keys.F9)
                {
                    if (this.CmdDel.Enabled)
                    {
                        this.CmdDel_Click(RuntimeHelpers.GetObjectValue(sender), e);
                    }
                }
                else if (keyCode == Keys.F10)
                {
                    if (this.CmdSave.Enabled)
                    {
                        this.CmdSave_Click(RuntimeHelpers.GetObjectValue(sender), e);
                    }
                }
                else if ((keyCode == Keys.F11) && this.CmdUnsave.Enabled)
                {
                    this.CmdUnsave_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
        }

        private void Frm_PhieuThu_Load(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.EnabledControl = false;
                BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, false, "", "");
                LVYModule.BuildComboHangMucBaoCaoThue(this.CboLoaiHoaDon);
                this.VSlist.Cols[0x12].Editor = this.TxtNgayHoaDon;
                this.VSlist.Cols[20].Editor = this.CboLoaiHoaDon;
                this.cFrmFormat = modGeneral.H_FORMATNUMBER;
                this.FormatNumber();
                this.C1DockingTab1_SelectedIndexChanged(RuntimeHelpers.GetObjectValue(sender), e);
                BuildComboModule.InitComboDatatype(this.CboLoaiDuLieu);
                this.PNDungChung.Visible = modGeneral.H_KETHOPDULIEUTHUE;
                if (this.cFrmKhoa.Trim() != "")
                {
                    this.ShowData(this.cFrmKhoa);
                }
                this.Cursor = Cursors.Default;
            }
        }

        public void InitDefault()
        {
            this.AdvTaiKhoan.Value = modGeneral.H_DEFAULT.Item("H_TKC_BNNH").GiaTri.ToString().Trim();
            EventArgs e = new EventArgs();
            this.AdvTaiKhoan_ValueChanged(this, e);
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_BaoNoNganHang));
            this.TxtDienGiai = new TextBox();
            this.Label9 = new Label();
            this.Label4 = new Label();
            this.TxtChungTuDinhKem = new TextBox();
            this.Label3 = new Label();
            this.TxtSoCMND = new TextBox();
            this.Label17 = new Label();
            this.TxtDiaChi = new TextBox();
            this.TxtNguoiNhan = new TextBox();
            this.Label18 = new Label();
            this.Label19 = new Label();
            this.CboLoaiTien = new ComboBox();
            this.txtTyGia = new C1NumericEdit();
            this.Label11 = new Label();
            this.Label10 = new Label();
            this.Label2 = new Label();
            this.Label13 = new Label();
            this.TxtNgayChungTu = new DateTimePicker();
            this.Label1 = new Label();
            this.TxtSoChungTu = new TextBox();
            this.ImageList1 = new ImageList(this.components);
            this.TxtSoTien = new C1NumericEdit();
            this.ToolStrip1 = new ToolStrip();
            this.CmdAdd = new ToolStripButton();
            this.CmdEdit = new ToolStripButton();
            this.ToolStripSeparator2 = new ToolStripSeparator();
            this.CmdSave = new ToolStripButton();
            this.CmdUnsave = new ToolStripButton();
            this.ToolStripSeparator1 = new ToolStripSeparator();
            this.CmdFind = new ToolStripButton();
            this.CmdPrint = new ToolStripSplitButton();
            this.mnGiayBaoNo = new ToolStripMenuItem();
            this.mnUyNhiemChi = new ToolStripMenuItem();
            this.ToolStripButton1 = new ToolStripSeparator();
            this.CmdDel = new ToolStripButton();
            this.ToolStripSeparator3 = new ToolStripSeparator();
            this.CmdExit = new ToolStripButton();
            this.CmdHelp = new ToolStripButton();
            this.TxtSoTienNT = new C1NumericEdit();
            this.Label5 = new Label();
            this.TxtNgayHoaDon = new DateTimePicker();
            this.Panel5 = new Panel();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.Panel4 = new Panel();
            this.CboLoaiHoaDon = new MultiColumnComboBox();
            this.CmdAddChungTu = new Button();
            this.CmdDelRow = new Button();
            this.CmdAddRow = new Button();
            this.PNDungChung = new Panel();
            this.CmdChuyen = new Button();
            this.CboLoaiDuLieu = new ComboBox();
            this.C1DockingTab1 = new C1DockingTab();
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.C1DockingTabPage2 = new C1DockingTabPage();
            this.C1DockingTabPage3 = new C1DockingTabPage();
            this.C1DockingTab2 = new C1DockingTab();
            this.C1DockingTabPage4 = new C1DockingTabPage();
            this.AdvNganhang = new ADVObjects();
            this.AdvTaiKhoan = new ADVAccount();
            ((ISupportInitialize) this.txtTyGia).BeginInit();
            ((ISupportInitialize) this.TxtSoTien).BeginInit();
            this.ToolStrip1.SuspendLayout();
            ((ISupportInitialize) this.TxtSoTienNT).BeginInit();
            this.Panel5.SuspendLayout();
            this.VSlist.BeginInit();
            this.Panel4.SuspendLayout();
            this.PNDungChung.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab2).BeginInit();
            this.C1DockingTab2.SuspendLayout();
            this.C1DockingTabPage4.SuspendLayout();
            this.SuspendLayout();
            Point point = new Point(0x1f1, 90);
            this.TxtDienGiai.Location = point;
            this.TxtDienGiai.Name = "TxtDienGiai";
            Size size = new Size(0x16c, 20);
            this.TxtDienGiai.Size = size;
            this.TxtDienGiai.TabIndex = 10;
            this.Label9.AutoEllipsis = true;
            this.Label9.AutoSize = true;
            this.Label9.BackColor = Color.Transparent;
            point = new Point(0x1b3, 0x5e);
            this.Label9.Location = point;
            this.Label9.Name = "Label9";
            this.Label9.RightToLeft = RightToLeft.No;
            size = new Size(0x30, 13);
            this.Label9.Size = size;
            this.Label9.TabIndex = 0x5f;
            this.Label9.Text = "Diễn giải";
            this.Label9.TextAlign = ContentAlignment.TopRight;
            this.Label4.AutoSize = true;
            this.Label4.BackColor = Color.Transparent;
            point = new Point(20, 0x5e);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(60, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x63;
            this.Label4.Text = "Ng\x00e2n h\x00e0ng";
            point = new Point(0x1f1, 0x40);
            this.TxtChungTuDinhKem.Location = point;
            this.TxtChungTuDinhKem.Name = "TxtChungTuDinhKem";
            size = new Size(0x16c, 20);
            this.TxtChungTuDinhKem.Size = size;
            this.TxtChungTuDinhKem.TabIndex = 9;
            this.Label3.AutoEllipsis = true;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new Point(0x1b3, 0x44);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            this.Label3.RightToLeft = RightToLeft.No;
            size = new Size(0x36, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x5d;
            this.Label3.Text = "Đ\x00ednh k\x00e8m";
            this.Label3.TextAlign = ContentAlignment.TopRight;
            point = new Point(0x2f9, 13);
            this.TxtSoCMND.Location = point;
            this.TxtSoCMND.MaxLength = 9;
            this.TxtSoCMND.Name = "TxtSoCMND";
            size = new Size(100, 20);
            this.TxtSoCMND.Size = size;
            this.TxtSoCMND.TabIndex = 7;
            this.Label17.AutoEllipsis = true;
            this.Label17.AutoSize = true;
            this.Label17.BackColor = Color.Transparent;
            point = new Point(0x2bf, 0x10);
            this.Label17.Location = point;
            this.Label17.Name = "Label17";
            this.Label17.RightToLeft = RightToLeft.No;
            size = new Size(0x37, 13);
            this.Label17.Size = size;
            this.Label17.TabIndex = 0x5c;
            this.Label17.Text = "Số CMND";
            this.Label17.TextAlign = ContentAlignment.TopRight;
            point = new Point(0x1f1, 0x27);
            this.TxtDiaChi.Location = point;
            this.TxtDiaChi.Name = "TxtDiaChi";
            size = new Size(0x16c, 20);
            this.TxtDiaChi.Size = size;
            this.TxtDiaChi.TabIndex = 8;
            point = new Point(0x1f1, 13);
            this.TxtNguoiNhan.Location = point;
            this.TxtNguoiNhan.Name = "TxtNguoiNhan";
            size = new Size(200, 20);
            this.TxtNguoiNhan.Size = size;
            this.TxtNguoiNhan.TabIndex = 6;
            this.Label18.AutoEllipsis = true;
            this.Label18.AutoSize = true;
            this.Label18.BackColor = Color.Transparent;
            point = new Point(0x1b3, 15);
            this.Label18.Location = point;
            this.Label18.Name = "Label18";
            this.Label18.RightToLeft = RightToLeft.No;
            size = new Size(0x3e, 13);
            this.Label18.Size = size;
            this.Label18.TabIndex = 0x5b;
            this.Label18.Text = "Người nhận";
            this.Label18.TextAlign = ContentAlignment.TopRight;
            this.Label19.AutoEllipsis = true;
            this.Label19.AutoSize = true;
            this.Label19.BackColor = Color.Transparent;
            point = new Point(0x1b3, 0x2a);
            this.Label19.Location = point;
            this.Label19.Name = "Label19";
            this.Label19.RightToLeft = RightToLeft.No;
            size = new Size(40, 13);
            this.Label19.Size = size;
            this.Label19.TabIndex = 90;
            this.Label19.Text = "Địa chỉ";
            this.Label19.TextAlign = ContentAlignment.TopRight;
            this.CboLoaiTien.FormattingEnabled = true;
            point = new Point(0x71, 0x40);
            this.CboLoaiTien.Location = point;
            this.CboLoaiTien.Name = "CboLoaiTien";
            size = new Size(0x68, 0x15);
            this.CboLoaiTien.Size = size;
            this.CboLoaiTien.TabIndex = 3;
            this.txtTyGia.BorderStyle = BorderStyle.FixedSingle;
            this.txtTyGia.DataType = typeof(double);
            this.txtTyGia.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x11b, 0x40);
            this.txtTyGia.Location = point;
            this.txtTyGia.Name = "txtTyGia";
            Padding padding = new Padding(1);
            this.txtTyGia.Padding = padding;
            size = new Size(100, 20);
            this.txtTyGia.Size = size;
            this.txtTyGia.TabIndex = 4;
            this.txtTyGia.Tag = null;
            this.txtTyGia.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.txtTyGia.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.txtTyGia.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label11.AutoSize = true;
            this.Label11.BackColor = Color.Transparent;
            point = new Point(0x15, 0x44);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x2f, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 0x39;
            this.Label11.Text = "Loại tiền";
            this.Label11.TextAlign = ContentAlignment.TopRight;
            this.Label10.AutoSize = true;
            this.Label10.BackColor = Color.Transparent;
            point = new Point(0xe2, 0x43);
            this.Label10.Location = point;
            this.Label10.Name = "Label10";
            size = new Size(0x24, 13);
            this.Label10.Size = size;
            this.Label10.TabIndex = 0x38;
            this.Label10.Text = "Tỷ gi\x00e1";
            this.Label10.TextAlign = ContentAlignment.TopRight;
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(0x15, 0x29);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x43, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x25;
            this.Label2.Text = "Số t\x00e0i khoản";
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            point = new Point(230, 15);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x20, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x23;
            this.Label13.Text = "Ng\x00e0y";
            this.TxtNgayChungTu.Format = DateTimePickerFormat.Short;
            point = new Point(0x11d, 12);
            this.TxtNgayChungTu.Location = point;
            this.TxtNgayChungTu.Name = "TxtNgayChungTu";
            size = new Size(0x63, 20);
            this.TxtNgayChungTu.Size = size;
            this.TxtNgayChungTu.TabIndex = 1;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(0x15, 15);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x41, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x21;
            this.Label1.Text = "Số chứng từ";
            point = new Point(0x71, 12);
            this.TxtSoChungTu.Location = point;
            this.TxtSoChungTu.Name = "TxtSoChungTu";
            size = new Size(0x68, 20);
            this.TxtSoChungTu.Size = size;
            this.TxtSoChungTu.TabIndex = 0;
            this.ImageList1.ImageStream = (ImageListStreamer) manager.GetObject("ImageList1.ImageStream");
            this.ImageList1.TransparentColor = Color.Transparent;
            this.ImageList1.Images.SetKeyName(0, "orders_main.png");
            this.ImageList1.Images.SetKeyName(1, "checkingacct.png");
            this.ImageList1.Images.SetKeyName(2, "billing.png");
            this.TxtSoTien.BorderStyle = BorderStyle.FixedSingle;
            this.TxtSoTien.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0xc5, 8);
            this.TxtSoTien.Location = point;
            this.TxtSoTien.Name = "TxtSoTien";
            padding = new Padding(1);
            this.TxtSoTien.Padding = padding;
            this.TxtSoTien.ReadOnly = true;
            size = new Size(0x6d, 20);
            this.TxtSoTien.Size = size;
            this.TxtSoTien.TabIndex = 0x58;
            this.TxtSoTien.Tag = null;
            this.TxtSoTien.TextAlign = HorizontalAlignment.Right;
            this.TxtSoTien.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtSoTien.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtSoTien.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.ToolStrip1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgbluenoborder;
            this.ToolStrip1.Items.AddRange(new ToolStripItem[] { this.CmdAdd, this.CmdEdit, this.ToolStripSeparator2, this.CmdSave, this.CmdUnsave, this.ToolStripSeparator1, this.CmdFind, this.CmdPrint, this.ToolStripButton1, this.CmdDel, this.ToolStripSeparator3, this.CmdExit, this.CmdHelp });
            point = new Point(0, 0);
            this.ToolStrip1.Location = point;
            this.ToolStrip1.Name = "ToolStrip1";
            size = new Size(0x37e, 0x19);
            this.ToolStrip1.Size = size;
            this.ToolStrip1.TabIndex = 0;
            this.ToolStrip1.Text = "ToolStrip1";
            this.CmdAdd.Image = (Image) manager.GetObject("CmdAdd.Image");
            this.CmdAdd.ImageTransparentColor = Color.White;
            this.CmdAdd.Name = "CmdAdd";
            size = new Size(0x52, 0x16);
            this.CmdAdd.Size = size;
            this.CmdAdd.Text = "&Th\x00eam mới";
            this.CmdEdit.Image = (Image) manager.GetObject("CmdEdit.Image");
            this.CmdEdit.ImageTransparentColor = Color.White;
            this.CmdEdit.Name = "CmdEdit";
            size = new Size(0x2e, 0x16);
            this.CmdEdit.Size = size;
            this.CmdEdit.Text = "&Sửa";
            this.ToolStripSeparator2.Name = "ToolStripSeparator2";
            size = new Size(6, 0x19);
            this.ToolStripSeparator2.Size = size;
            this.CmdSave.Image = (Image) manager.GetObject("CmdSave.Image");
            this.CmdSave.ImageTransparentColor = Color.WhiteSmoke;
            this.CmdSave.Name = "CmdSave";
            size = new Size(0x2f, 0x16);
            this.CmdSave.Size = size;
            this.CmdSave.Text = "&Lưu";
            this.CmdUnsave.Image = (Image) manager.GetObject("CmdUnsave.Image");
            this.CmdUnsave.ImageTransparentColor = Color.White;
            this.CmdUnsave.Name = "CmdUnsave";
            size = new Size(0x39, 0x16);
            this.CmdUnsave.Size = size;
            this.CmdUnsave.Text = "&K.Lưu";
            this.ToolStripSeparator1.Name = "ToolStripSeparator1";
            size = new Size(6, 0x19);
            this.ToolStripSeparator1.Size = size;
            this.CmdFind.Image = (Image) manager.GetObject("CmdFind.Image");
            this.CmdFind.ImageTransparentColor = Color.White;
            this.CmdFind.Name = "CmdFind";
            size = new Size(0x4d, 0x16);
            this.CmdFind.Size = size;
            this.CmdFind.Text = "T\x00ecm kiếm";
            this.CmdPrint.DropDownItems.AddRange(new ToolStripItem[] { this.mnGiayBaoNo, this.mnUyNhiemChi });
            this.CmdPrint.Image = (Image) manager.GetObject("CmdPrint.Image");
            this.CmdPrint.ImageTransparentColor = Color.White;
            this.CmdPrint.Name = "CmdPrint";
            size = new Size(0x31, 0x16);
            this.CmdPrint.Size = size;
            this.CmdPrint.Text = "&In";
            this.mnGiayBaoNo.Name = "mnGiayBaoNo";
            size = new Size(0x90, 0x16);
            this.mnGiayBaoNo.Size = size;
            this.mnGiayBaoNo.Text = "Giấy b\x00e1o nợ";
            this.mnUyNhiemChi.Name = "mnUyNhiemChi";
            size = new Size(0x90, 0x16);
            this.mnUyNhiemChi.Size = size;
            this.mnUyNhiemChi.Text = "Ủy nhiệm chi";
            this.mnUyNhiemChi.Visible = false;
            this.ToolStripButton1.Name = "ToolStripButton1";
            size = new Size(6, 0x19);
            this.ToolStripButton1.Size = size;
            this.CmdDel.Image = (Image) manager.GetObject("CmdDel.Image");
            this.CmdDel.ImageTransparentColor = Color.White;
            this.CmdDel.Name = "CmdDel";
            size = new Size(0x2f, 0x16);
            this.CmdDel.Size = size;
            this.CmdDel.Text = "&X\x00f3a";
            this.ToolStripSeparator3.Name = "ToolStripSeparator3";
            size = new Size(6, 0x19);
            this.ToolStripSeparator3.Size = size;
            this.CmdExit.Alignment = ToolStripItemAlignment.Right;
            this.CmdExit.Image = (Image) manager.GetObject("CmdExit.Image");
            this.CmdExit.ImageTransparentColor = Color.White;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x3a, 0x16);
            this.CmdExit.Size = size;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.CmdHelp.Alignment = ToolStripItemAlignment.Right;
            this.CmdHelp.Image = (Image) manager.GetObject("CmdHelp.Image");
            this.CmdHelp.ImageTransparentColor = Color.Magenta;
            this.CmdHelp.Name = "CmdHelp";
            size = new Size(0x34, 0x16);
            this.CmdHelp.Size = size;
            this.CmdHelp.Text = "&Help";
            this.TxtSoTienNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtSoTienNT.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x57, 8);
            this.TxtSoTienNT.Location = point;
            this.TxtSoTienNT.Name = "TxtSoTienNT";
            padding = new Padding(1);
            this.TxtSoTienNT.Padding = padding;
            this.TxtSoTienNT.ReadOnly = true;
            size = new Size(0x6d, 20);
            this.TxtSoTienNT.Size = size;
            this.TxtSoTienNT.TabIndex = 0x57;
            this.TxtSoTienNT.Tag = null;
            this.TxtSoTienNT.TextAlign = HorizontalAlignment.Right;
            this.TxtSoTienNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtSoTienNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtSoTienNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label5.AutoEllipsis = true;
            this.Label5.AutoSize = true;
            this.Label5.BackColor = Color.Transparent;
            this.Label5.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0xa3);
            point = new Point(10, 11);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            this.Label5.RightToLeft = RightToLeft.No;
            size = new Size(0x44, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0x4f;
            this.Label5.Text = "Tổng cộng";
            this.Label5.TextAlign = ContentAlignment.TopRight;
            this.TxtNgayHoaDon.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0xa3);
            this.TxtNgayHoaDon.Format = DateTimePickerFormat.Short;
            point = new Point(0xd6, 0x29);
            this.TxtNgayHoaDon.Location = point;
            this.TxtNgayHoaDon.Name = "TxtNgayHoaDon";
            size = new Size(0x54, 20);
            this.TxtNgayHoaDon.Size = size;
            this.TxtNgayHoaDon.TabIndex = 12;
            this.Panel5.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel5.BackgroundImageLayout = ImageLayout.Stretch;
            this.Panel5.Controls.Add(this.TxtSoTien);
            this.Panel5.Controls.Add(this.TxtSoTienNT);
            this.Panel5.Controls.Add(this.Label5);
            this.Panel5.Dock = DockStyle.Right;
            point = new Point(0x247, 0);
            this.Panel5.Location = point;
            this.Panel5.Name = "Panel5";
            size = new Size(0x137, 0x25);
            this.Panel5.Size = size;
            this.Panel5.TabIndex = 0;
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.XpThemes;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 210);
            this.VSlist.Location = point;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            this.VSlist.Rows.MaxSize = 0x13;
            this.VSlist.Rows.MinSize = 0x13;
            size = new Size(0x37e, 0x142);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0x19;
            this.VSlist.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            this.Panel4.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel4.BackgroundImageLayout = ImageLayout.Stretch;
            this.Panel4.Controls.Add(this.CboLoaiHoaDon);
            this.Panel4.Controls.Add(this.CmdAddChungTu);
            this.Panel4.Controls.Add(this.TxtNgayHoaDon);
            this.Panel4.Controls.Add(this.CmdDelRow);
            this.Panel4.Controls.Add(this.CmdAddRow);
            this.Panel4.Controls.Add(this.Panel5);
            this.Panel4.Dock = DockStyle.Bottom;
            point = new Point(0, 0x214);
            this.Panel4.Location = point;
            this.Panel4.Name = "Panel4";
            size = new Size(0x37e, 0x25);
            this.Panel4.Size = size;
            this.Panel4.TabIndex = 0x18;
            this.CboLoaiHoaDon.AutoComplete = false;
            this.CboLoaiHoaDon.AutoDropdown = false;
            this.CboLoaiHoaDon.BackColorEven = Color.White;
            this.CboLoaiHoaDon.BackColorOdd = Color.White;
            this.CboLoaiHoaDon.ColumnNames = "";
            this.CboLoaiHoaDon.ColumnWidthDefault = 0x4b;
            this.CboLoaiHoaDon.ColumnWidths = "";
            this.CboLoaiHoaDon.DrawMode = DrawMode.OwnerDrawVariable;
            this.CboLoaiHoaDon.FormattingEnabled = true;
            this.CboLoaiHoaDon.LinkedColumnIndex = 0;
            this.CboLoaiHoaDon.LinkedTextBox = null;
            point = new Point(0x17e, 0x2a);
            this.CboLoaiHoaDon.Location = point;
            this.CboLoaiHoaDon.Name = "CboLoaiHoaDon";
            size = new Size(0x6a, 0x15);
            this.CboLoaiHoaDon.Size = size;
            this.CboLoaiHoaDon.TabIndex = 0x10;
            this.CmdAddChungTu.Image = (Image) manager.GetObject("CmdAddChungTu.Image");
            this.CmdAddChungTu.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0xc3, 6);
            this.CmdAddChungTu.Location = point;
            this.CmdAddChungTu.Name = "CmdAddChungTu";
            size = new Size(0x86, 0x18);
            this.CmdAddChungTu.Size = size;
            this.CmdAddChungTu.TabIndex = 2;
            this.CmdAddChungTu.Text = "&3.H\x00f3a đơn mua h\x00e0ng";
            this.CmdAddChungTu.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdAddChungTu.UseVisualStyleBackColor = true;
            this.CmdDelRow.Image = (Image) manager.GetObject("CmdDelRow.Image");
            this.CmdDelRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(100, 6);
            this.CmdDelRow.Location = point;
            this.CmdDelRow.Name = "CmdDelRow";
            size = new Size(0x59, 0x18);
            this.CmdDelRow.Size = size;
            this.CmdDelRow.TabIndex = 1;
            this.CmdDelRow.Text = "&2.X\x00f3a d\x00f2ng";
            this.CmdDelRow.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdDelRow.UseVisualStyleBackColor = true;
            this.CmdAddRow.Image = (Image) manager.GetObject("CmdAddRow.Image");
            this.CmdAddRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(3, 6);
            this.CmdAddRow.Location = point;
            this.CmdAddRow.Name = "CmdAddRow";
            size = new Size(0x5c, 0x18);
            this.CmdAddRow.Size = size;
            this.CmdAddRow.TabIndex = 0;
            this.CmdAddRow.Text = "&1.Th\x00eam d\x00f2ng";
            this.CmdAddRow.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdAddRow.UseVisualStyleBackColor = true;
            this.PNDungChung.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            this.PNDungChung.Controls.Add(this.CmdChuyen);
            this.PNDungChung.Controls.Add(this.CboLoaiDuLieu);
            point = new Point(0x25b, 0x19);
            this.PNDungChung.Location = point;
            this.PNDungChung.Name = "PNDungChung";
            size = new Size(0x11f, 0x17);
            this.PNDungChung.Size = size;
            this.PNDungChung.TabIndex = 30;
            this.PNDungChung.Visible = false;
            this.CmdChuyen.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            point = new Point(0x101, 1);
            this.CmdChuyen.Location = point;
            this.CmdChuyen.Name = "CmdChuyen";
            size = new Size(0x18, 0x17);
            this.CmdChuyen.Size = size;
            this.CmdChuyen.TabIndex = 1;
            this.CmdChuyen.Text = ">";
            this.CmdChuyen.UseVisualStyleBackColor = true;
            this.CmdChuyen.Visible = false;
            this.CboLoaiDuLieu.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiDuLieu.FormattingEnabled = true;
            point = new Point(0x5d, 2);
            this.CboLoaiDuLieu.Location = point;
            this.CboLoaiDuLieu.Name = "CboLoaiDuLieu";
            size = new Size(0xa3, 0x15);
            this.CboLoaiDuLieu.Size = size;
            this.CboLoaiDuLieu.TabIndex = 0;
            this.CboLoaiDuLieu.Visible = false;
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage2);
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage3);
            this.C1DockingTab1.Dock = DockStyle.Top;
            point = new Point(0, 0xb8);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            size = new Size(0x37e, 0x1a);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabIndex = 2;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            size = new Size(0x37c, 0);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "F5. Th\x00f4ng tin chi tiết";
            this.C1DockingTabPage2.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage2.Location = point;
            this.C1DockingTabPage2.Name = "C1DockingTabPage2";
            size = new Size(0x37c, 0);
            this.C1DockingTabPage2.Size = size;
            this.C1DockingTabPage2.TabIndex = 1;
            this.C1DockingTabPage2.Text = "F6. Th\x00f4ng tin thuế";
            this.C1DockingTabPage3.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage3.Location = point;
            this.C1DockingTabPage3.Name = "C1DockingTabPage3";
            size = new Size(0x37c, 0);
            this.C1DockingTabPage3.Size = size;
            this.C1DockingTabPage3.TabIndex = 2;
            this.C1DockingTabPage3.Text = "F7. Th\x00f4ng tin gi\x00e1 th\x00e0nh";
            this.C1DockingTab2.Controls.Add(this.C1DockingTabPage4);
            this.C1DockingTab2.Dock = DockStyle.Top;
            point = new Point(0, 0x19);
            this.C1DockingTab2.Location = point;
            this.C1DockingTab2.Name = "C1DockingTab2";
            size = new Size(0x37e, 0x9f);
            this.C1DockingTab2.Size = size;
            this.C1DockingTab2.TabIndex = 1;
            this.C1DockingTab2.TabsSpacing = 5;
            this.C1DockingTab2.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab2.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab2.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage4.Controls.Add(this.AdvNganhang);
            this.C1DockingTabPage4.Controls.Add(this.TxtDienGiai);
            this.C1DockingTabPage4.Controls.Add(this.Label4);
            this.C1DockingTabPage4.Controls.Add(this.TxtSoChungTu);
            this.C1DockingTabPage4.Controls.Add(this.Label1);
            this.C1DockingTabPage4.Controls.Add(this.Label9);
            this.C1DockingTabPage4.Controls.Add(this.TxtNgayChungTu);
            this.C1DockingTabPage4.Controls.Add(this.TxtChungTuDinhKem);
            this.C1DockingTabPage4.Controls.Add(this.Label13);
            this.C1DockingTabPage4.Controls.Add(this.Label3);
            this.C1DockingTabPage4.Controls.Add(this.AdvTaiKhoan);
            this.C1DockingTabPage4.Controls.Add(this.TxtSoCMND);
            this.C1DockingTabPage4.Controls.Add(this.Label2);
            this.C1DockingTabPage4.Controls.Add(this.Label17);
            this.C1DockingTabPage4.Controls.Add(this.Label10);
            this.C1DockingTabPage4.Controls.Add(this.TxtDiaChi);
            this.C1DockingTabPage4.Controls.Add(this.Label11);
            this.C1DockingTabPage4.Controls.Add(this.TxtNguoiNhan);
            this.C1DockingTabPage4.Controls.Add(this.txtTyGia);
            this.C1DockingTabPage4.Controls.Add(this.Label18);
            this.C1DockingTabPage4.Controls.Add(this.CboLoaiTien);
            this.C1DockingTabPage4.Controls.Add(this.Label19);
            this.C1DockingTabPage4.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage4.Location = point;
            this.C1DockingTabPage4.Name = "C1DockingTabPage4";
            size = new Size(0x37c, 0x85);
            this.C1DockingTabPage4.Size = size;
            this.C1DockingTabPage4.TabIndex = 0;
            this.C1DockingTabPage4.Text = "Th\x00f4ng tin phiếu b\x00e1o nợ ng\x00e2n h\x00e0ng";
            this.AdvNganhang.Conditions = "";
            this.AdvNganhang.LoaiDoiTuong = modGeneral.TypeObjects.NganHang;
            point = new Point(0x71, 0x5b);
            this.AdvNganhang.Location = point;
            this.AdvNganhang.Name = "AdvNganhang";
            this.AdvNganhang.ReadOnly = false;
            size = new Size(0x10f, 20);
            this.AdvNganhang.Size = size;
            this.AdvNganhang.TabIndex = 5;
            this.AdvNganhang.UpperText = true;
            this.AdvNganhang.Value = "";
            this.AdvNganhang.WidthCode = 80;
            this.AdvTaiKhoan.Conditions = "";
            this.AdvTaiKhoan.DefaultValue = "";
            this.AdvTaiKhoan.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTaiKhoan.KeyFilter = "112";
            point = new Point(0x71, 0x26);
            this.AdvTaiKhoan.Location = point;
            padding = new Padding(0);
            this.AdvTaiKhoan.Margin = padding;
            this.AdvTaiKhoan.Name = "AdvTaiKhoan";
            this.AdvTaiKhoan.OnlyDigit = false;
            this.AdvTaiKhoan.ReadOnly = false;
            size = new Size(0x10f, 20);
            this.AdvTaiKhoan.Size = size;
            this.AdvTaiKhoan.TabIndex = 2;
            this.AdvTaiKhoan.UpperText = true;
            this.AdvTaiKhoan.Value = "";
            this.AdvTaiKhoan.WithCode = 80;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x37e, 0x239);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.PNDungChung);
            this.Controls.Add(this.VSlist);
            this.Controls.Add(this.C1DockingTab1);
            this.Controls.Add(this.Panel4);
            this.Controls.Add(this.C1DockingTab2);
            this.Controls.Add(this.ToolStrip1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.Name = "Frm_BaoNoNganHang";
            this.ShowIcon = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "NV-0004             ";
            this.Text = "GIAY BAO NO NGAN HANG";
            ((ISupportInitialize) this.txtTyGia).EndInit();
            ((ISupportInitialize) this.TxtSoTien).EndInit();
            this.ToolStrip1.ResumeLayout(false);
            this.ToolStrip1.PerformLayout();
            ((ISupportInitialize) this.TxtSoTienNT).EndInit();
            this.Panel5.ResumeLayout(false);
            this.Panel5.PerformLayout();
            this.VSlist.EndInit();
            this.Panel4.ResumeLayout(false);
            this.PNDungChung.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab2).EndInit();
            this.C1DockingTab2.ResumeLayout(false);
            this.C1DockingTabPage4.ResumeLayout(false);
            this.C1DockingTabPage4.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        private void mnGiayBaoNo_Click(object sender, EventArgs e)
        {
            if (this.cFrmKhoa.ToString().Trim() != "")
            {
                ReportModule.PrintGiayBaoNo(this.cFrmKhoa);
            }
        }

        private void mnUyNhiemChi_Click(object sender, EventArgs e)
        {
            if (this.cFrmKhoa.Trim() != "")
            {
                MyProject.Forms.Frm_InUyNhiemChi.cFrmKhoa = this.cFrmKhoa;
                MyProject.Forms.Frm_InUyNhiemChi.ShowDialog();
            }
        }

        public bool SaveDetailsTemp()
        {
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                clsChungTuQuyChiTiet objBNCT = this.objBNCT;
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    this.VSlist[i, 0] = modGeneral.CreatKey("GL_BaoNoChiTiet", 15, "BN");
                }
                objBNCT.Khoa = Conversions.ToString(this.VSlist[i, 0]);
                objBNCT.KhoaTaiKhoan = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                objBNCT.KhoaDoiTuong = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 4]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.KhoaChungTu = this.cFrmKhoa;
                objBNCT.KhoaBoPhan = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x18]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.KhoaSanPham = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x1a]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.KhoaHopDong = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x1c]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.SoTienNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 8]), 0, modGeneral.TypeOfValue.Nothing));
                objBNCT.SoTien = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 9]), 0, modGeneral.TypeOfValue.Nothing));
                objBNCT.KhoaTaiKhoanThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 10]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.KhoaDoiTuongThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 12]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.TenDoiTuongThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 13]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.MaSoThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 14]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.DiaChiThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 15]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.SoSeri = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x10]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.SoHoaDon = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x11]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.NgayHoaDon = LVYModule.Date2Char(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x12]), "", modGeneral.TypeOfValue.Nothing).ToString());
                objBNCT.KhoaLoaiThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x13]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.TyLeThue = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x15]), 0, modGeneral.TypeOfValue.Nothing));
                objBNCT.TienThueNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x16]), 0, modGeneral.TypeOfValue.Nothing));
                objBNCT.TienThue = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x17]), 0, modGeneral.TypeOfValue.Nothing));
                objBNCT.KhoaLoaiChungTu = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 30]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.DienGiai = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x20]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.LoaiTien = Conversions.ToString(this.CboLoaiTien.SelectedValue);
                objBNCT.TyGia = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing));
                objBNCT.KhoaChungTuThamChieu = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 6]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.SoChungTuThamChieu = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 7]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objBNCT.Ve = "NO";
                objBNCT.Flag = Conversions.ToInteger(this.VSlist[i, 0x21]);
                if (!objBNCT.Save())
                {
                    return false;
                }
                objBNCT = null;
            }
            return true;
        }

        public bool SearchThamChieu(string pKhoaCT)
        {
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (pKhoaCT.Trim() == LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 6]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim())
                {
                    return true;
                }
            }
            return false;
        }

        public void ShowData(string strKhoa)
        {
            if (this.objBN.Load(strKhoa))
            {
                clsChungTuQuy objBN = this.objBN;
                this.cFrmKhoa = objBN.Khoa;
                this.TxtSoChungTu.Text = objBN.SoChungTu;
                this.TxtNgayChungTu.Text = LVYModule.Char2Date(objBN.NgayChungTu);
                this.AdvTaiKhoan.Value = objBN.KhoaTKChu;
                this.CboLoaiTien.SelectedValue = objBN.LoaiTien.Trim();
                this.txtTyGia.Value = objBN.TyGia;
                this.TxtNguoiNhan.Text = objBN.NguoiDaiDien;
                this.TxtSoCMND.Text = objBN.SoCMND;
                this.TxtDiaChi.Text = objBN.DiaChi.Trim();
                this.TxtDienGiai.Text = objBN.DienGiai.Trim();
                this.TxtSoTienNT.Value = objBN.SoTienNT;
                this.TxtSoTien.Value = objBN.SoTien;
                this.AdvNganhang.Value = objBN.KhoaDoiTuong;
                this.TxtChungTuDinhKem.Text = objBN.ChungTuDinhKem.Trim();
                this.CboLoaiDuLieu.SelectedValue = objBN.DuLieu;
                objBN = null;
                this.VSlist.Rows.Count = 1;
                DataTable listDetailsDauVao = this.objBN.GetListDetailsDauVao(this.objBN.Khoa);
                if (listDetailsDauVao != null)
                {
                    int num3 = listDetailsDauVao.Rows.Count - 1;
                    for (int i = 0; i <= num3; i++)
                    {
                        C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                        vSlist.AddItem("");
                        vSlist[vSlist.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["Khoa"]);
                        vSlist[vSlist.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["KhoaTaiKhoan"]);
                        vSlist[vSlist.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["SoTaiKhoan"]);
                        vSlist[vSlist.Rows.Count - 1, 3] = "NO";
                        vSlist[vSlist.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["KhoaDoiTuong"]);
                        vSlist[vSlist.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["DoiTuong"]);
                        vSlist[vSlist.Rows.Count - 1, 6] = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["KhoaChungTuThamChieu"]), "", modGeneral.TypeOfValue.Nothing).ToString();
                        vSlist[vSlist.Rows.Count - 1, 7] = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["SoChungTuThamChieu"]), "", modGeneral.TypeOfValue.Nothing).ToString();
                        vSlist[vSlist.Rows.Count - 1, 8] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["SoTienNT"]);
                        vSlist[vSlist.Rows.Count - 1, 9] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["SoTien"]);
                        vSlist[vSlist.Rows.Count - 1, 10] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["KhoaTaiKhoanThue"]);
                        vSlist[vSlist.Rows.Count - 1, 11] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["TaiKhoanThue"]);
                        vSlist[vSlist.Rows.Count - 1, 12] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["KhoaDoiTuongThue"]);
                        vSlist[vSlist.Rows.Count - 1, 13] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["TenDoiTuongThue"]);
                        vSlist[vSlist.Rows.Count - 1, 14] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["MaSoThue"]);
                        vSlist[vSlist.Rows.Count - 1, 15] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["DiaChiThue"]);
                        vSlist[vSlist.Rows.Count - 1, 0x10] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["SoSeri"]);
                        vSlist[vSlist.Rows.Count - 1, 0x11] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["SoHoaDon"]);
                        vSlist[vSlist.Rows.Count - 1, 0x12] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["NgayHoaDon"]);
                        vSlist[vSlist.Rows.Count - 1, 0x13] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["KhoaLoaiThue"]);
                        vSlist[vSlist.Rows.Count - 1, 20] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["LoaiThue"]);
                        vSlist[vSlist.Rows.Count - 1, 0x15] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["TyLeThue"]);
                        vSlist[vSlist.Rows.Count - 1, 0x16] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["TienThueNT"]);
                        vSlist[vSlist.Rows.Count - 1, 0x17] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["TienThue"]);
                        vSlist[vSlist.Rows.Count - 1, 0x18] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["KhoaBoPhan"]);
                        vSlist[vSlist.Rows.Count - 1, 0x19] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["BoPhan"]);
                        vSlist[vSlist.Rows.Count - 1, 0x1a] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["KhoaSanPham"]);
                        vSlist[vSlist.Rows.Count - 1, 0x1b] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["SanPham"]);
                        vSlist[vSlist.Rows.Count - 1, 0x1c] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["KhoaHopDong"]);
                        vSlist[vSlist.Rows.Count - 1, 0x1d] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["SoHopDong"]);
                        vSlist[vSlist.Rows.Count - 1, 30] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["KhoaLoaiChungTu"]);
                        vSlist[vSlist.Rows.Count - 1, 0x1f] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["ChiPhi"]);
                        vSlist[vSlist.Rows.Count - 1, 0x20] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["DienGiai"]);
                        vSlist[vSlist.Rows.Count - 1, 0x21] = RuntimeHelpers.GetObjectValue(listDetailsDauVao.Rows[i]["FlagTamUng"]);
                        vSlist = null;
                    }
                    if (LVYModule.SumColGrid(this.VSlist, 8) == 0.0)
                    {
                        this.C1DockingTab1.SelectedIndex = 1;
                    }
                }
            }
        }

        private void TabDetails_Selecting(object sender, TabControlCancelEventArgs e)
        {
            if (!this.mEnabledControl && ((LVYModule.SumColGrid(this.VSlist, 8) == 0.0) & (e.TabPageIndex == 0)))
            {
                e.Cancel = true;
            }
        }

        public void TotalOfVoucher()
        {
            double num2 = LVYModule.SumColGrid(this.VSlist, 8) + LVYModule.SumColGrid(this.VSlist, 0x16);
            double num = LVYModule.SumColGrid(this.VSlist, 9) + LVYModule.SumColGrid(this.VSlist, 0x17);
            this.TxtSoTienNT.Value = num2;
            this.TxtSoTien.Value = num;
        }

        private void TxtDienGiai_LostFocus(object sender, EventArgs e)
        {
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x20]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    this.VSlist[i, 0x20] = this.TxtDienGiai.Text.Trim();
                }
            }
        }

        public bool UpdateData()
        {
            bool flag=false;
            clsChungTuQuy objBN = this.objBN;
            objBN.Khoa = this.cFrmKhoa;
            objBN.SoChungTu = this.TxtSoChungTu.Text;
            objBN.NgayChungTu = LVYModule.Date2Char(this.TxtNgayChungTu.Text);
            objBN.NgayCapNhat = LVYModule.Date2Char(Strings.Format(DateAndTime.Today, "dd/MM/yyyy"));
            objBN.NamThang = LVYModule.sLeft(objBN.NgayChungTu, 6);
            objBN.KhoaTKChu = this.AdvTaiKhoan.Value;
            objBN.NguoiDaiDien = this.TxtNguoiNhan.Text;
            objBN.DiaChi = this.TxtDiaChi.Text;
            objBN.LoaiTien = Conversions.ToString(this.CboLoaiTien.SelectedValue);
            objBN.TyGia = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing));
            objBN.SoCMND = this.TxtSoCMND.Text;
            objBN.ChungTuDinhKem = this.TxtChungTuDinhKem.Text;
            objBN.DienGiai = this.TxtDienGiai.Text;
            objBN.SoTienNT = Conversions.ToDouble(this.TxtSoTienNT.Value);
            objBN.SoTien = Conversions.ToDouble(this.TxtSoTien.Value);
            objBN.KhoaDoiTuong = this.AdvNganhang.Value;
            objBN.KhoaDonVi = modGeneral.H_CLIENT;
            objBN.KhoaNhanVienCapNhat = modGeneral.H_USERID;
            objBN.LoaiChungTu = "BN";
            objBN.DuLieu = Conversions.ToString(this.CboLoaiDuLieu.SelectedValue);
            return objBN.Save();
            objBN = null;
            return flag;
        }

        private void VSlist_AfterEdit(object sender, RowColEventArgs e)
        {
            object obj2;
            double num = 0.0;
            double num3 = 0.0;
            int num4 = 0;
            double num2 = 0.0;
            string expression = "";
            switch (e.Col)
            {
                case 2:
                    expression = SearchModule.SearchTaiKhoan(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 2]), "", modGeneral.TypeOfValue.Nothing).ToString(), "", "", "", "");
                    if (expression == "")
                    {
                        this.VSlist[e.Row, 1] = "";
                        this.VSlist[e.Row, 2] = "";
                        return;
                    }
                    obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                    this.VSlist[e.Row, 1] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                    this.VSlist[e.Row, 2] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                    this.VSlist.Select(e.Row, 4);
                    return;

                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 10:
                case 12:
                case 13:
                case 14:
                case 15:
                case 0x10:
                case 0x11:
                case 0x12:
                case 0x13:
                    return;

                case 8:
                    num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 8]), 0, modGeneral.TypeOfValue.Nothing));
                    num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                    this.VSlist[e.Row, 9] = num * num3;
                    this.TotalOfVoucher();
                    return;

                case 9:
                    this.TotalOfVoucher();
                    return;

                case 11:
                    expression = SearchModule.SearchTaiKhoan(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 11]), "", modGeneral.TypeOfValue.Nothing).ToString(), "", "", " LEFT(SoTaiKhoan,3) IN ('133', '333')", "");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 10] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 11] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                        this.FillDoiTuongThue(Conversions.ToString(this.VSlist[e.Row, 4]), e.Row);
                        this.VSlist.Select(e.Row, 13);
                    }
                    return;

                case 20:
                {
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiHoaDon.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
                    {
                        this.VSlist[this.VSlist.Row, 0x13] = "";
                        this.VSlist[this.VSlist.Row, 20] = "";
                        break;
                    }
                    this.VSlist[this.VSlist.Row, 0x13] = RuntimeHelpers.GetObjectValue(this.CboLoaiHoaDon.SelectedValue);
                    DataRowView selectedItem = (DataRowView) this.CboLoaiHoaDon.SelectedItem;
                    this.VSlist[this.VSlist.Row, 20] = selectedItem[1].ToString();
                    break;
                }
                case 0x15:
                    num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 8]), 0, modGeneral.TypeOfValue.Nothing));
                    num4 = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 0x15]), 0, modGeneral.TypeOfValue.Nothing));
                    num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                    num2 = Math.Round((double) ((num * num4) / 100.0), 0);
                    this.VSlist[e.Row, 0x16] = num2;
                    this.VSlist[e.Row, 0x17] = num2 * num3;
                    this.TotalOfVoucher();
                    return;

                case 0x16:
                    num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 0x16]), 0, modGeneral.TypeOfValue.Nothing));
                    num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                    this.VSlist[e.Row, 0x17] = num2 * num3;
                    this.TotalOfVoucher();
                    return;

                default:
                    return;
            }
            num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 8]), 0, modGeneral.TypeOfValue.Nothing));
            num4 = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 0x15]), 0, modGeneral.TypeOfValue.Nothing));
            num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
            num2 = Math.Round((double) ((num * num4) / 100.0), 0);
            this.VSlist[e.Row, 0x16] = num2;
            this.VSlist[e.Row, 0x17] = num2 * num3;
            this.TotalOfVoucher();
        }

        private void VSlist_BeforeEdit(object sender, RowColEventArgs e)
        {
            if (!this.mEnabledControl)
            {
                e.Cancel = true;
            }
            else
            {
                if ((e.Col > 3) & (e.Col < 10))
                {
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        e.Cancel = true;
                        return;
                    }
                    if (e.Col == 5)
                    {
                        clsDMTaiKhoan khoan = new clsDMTaiKhoan();
                        khoan.Load(this.VSlist[e.Row, 1].ToString().Trim());
                        if ((((khoan.DoiTuongCungCap + khoan.DoiTuongKhachHang) + khoan.DoiTuongNganHang) + khoan.DoiTuongNhanVien) == 0)
                        {
                            e.Cancel = true;
                            return;
                        }
                    }
                }
                if (((e.Col > 11) & (e.Col < 0x18)) && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 10]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == ""))
                {
                    e.Cancel = true;
                }
                else
                {
                    if ((e.Col > 0x18) & (e.Col < 0x20))
                    {
                        string str = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 2]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                        if (str == "")
                        {
                            e.Cancel = true;
                            return;
                        }
                        if (LVYModule.sLeft(str, 1) != "6")
                        {
                            e.Cancel = true;
                        }
                    }
                    if ((e.Col == 9) && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 7]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != ""))
                    {
                        e.Cancel = true;
                    }
                }
            }
        }

        private void VSlist_CellButtonClick(object sender, RowColEventArgs e)
        {
            object obj2;
            string expression = "";
            switch (e.Col)
            {
                case 2:
                    expression = SearchModule.SearchTaiKhoan("", "", "", "", "");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 1] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 2] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                    }
                    return;

                case 3:
                case 4:
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                case 12:
                case 13:
                case 14:
                case 15:
                case 0x10:
                case 0x11:
                case 0x12:
                case 0x13:
                case 0x15:
                case 0x16:
                case 0x17:
                case 0x18:
                case 0x1a:
                case 0x1c:
                case 30:
                    return;

                case 5:
                {
                    clsDMTaiKhoan khoan = new clsDMTaiKhoan();
                    khoan.Load(Conversions.ToString(this.VSlist[e.Row, 1]));
                    if (!((((khoan.DoiTuongCungCap == 0) & (khoan.DoiTuongKhachHang == 0)) & (khoan.DoiTuongNganHang == 0)) & (khoan.DoiTuongNhanVien == 0)))
                    {
                        if (khoan.DoiTuongCungCap == 1)
                        {
                            expression = SearchModule.SearchDoiTuong("", "S", "");
                        }
                        else if (khoan.DoiTuongKhachHang == 1)
                        {
                            expression = SearchModule.SearchDoiTuong("", "C", "");
                        }
                        else if (khoan.DoiTuongNganHang == 1)
                        {
                            expression = SearchModule.SearchDoiTuong("", "B", "");
                        }
                        else if (khoan.DoiTuongNhanVien == 1)
                        {
                            expression = SearchModule.SearchDoiTuong("", "E", "");
                        }
                        break;
                    }
                    expression = SearchModule.SearchDoiTuong("", "", "");
                    break;
                }
                case 11:
                    expression = SearchModule.SearchTaiKhoan("", "", "", " LEFT(SoTaiKhoan,3) IN ('133', '333')", "");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 10] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 11] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                        this.FillDoiTuongThue(Conversions.ToString(this.VSlist[e.Row, 4]), e.Row);
                    }
                    return;

                case 20:
                {
                    clsKhaiBaoThue thue = new clsKhaiBaoThue();
                    obj2 = LVYModule.ShowMultiDropDownBySource(this.VSlist, e.Row, e.Col, thue.GetList(" LoaiPhatSinh = 'MV' "), 10, 0, Conversions.ToString(1), "");
                    if ((obj2 != null) && (NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null).ToString().Trim() != ""))
                    {
                        this.VSlist[e.Row, 0x13] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 20] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                        return;
                    }
                    return;
                }
                case 0x19:
                    expression = SearchModule.SearchDepartment("");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 0x18] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 0x19] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
                    }
                    return;

                case 0x1b:
                    expression = SearchModule.SearchProduct("");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 0x1a] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 0x1b] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
                    }
                    return;

                case 0x1d:
                    expression = SearchModule.SearchContact("");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 0x1c] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 0x1d] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
                    }
                    return;

                case 0x1f:
                    expression = SearchModule.SearchCosting("");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 30] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 0x1f] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
                    }
                    return;

                default:
                    return;
            }
            if (expression != "")
            {
                obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                this.VSlist[e.Row, 4] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                this.VSlist[e.Row, 5] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
            }
            if ((this.TxtDiaChi.Text.Trim() == "") && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 4]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != ""))
            {
                clsDMDoiTuong tuong = new clsDMDoiTuong();
                tuong.Load(Conversions.ToString(this.VSlist[e.Row, 4]));
                if (tuong.Loai == "E")
                {
                    if (modGeneral.H_LANGUAGE == "VIET")
                    {
                        this.TxtDiaChi.Text = modGeneral.H_COMPANYNAMEVIET;
                    }
                    else
                    {
                        this.TxtDiaChi.Text = modGeneral.H_COMPANYNAMEANH;
                    }
                }
                else if (modGeneral.H_LANGUAGE == "VIET")
                {
                    this.TxtNguoiNhan.Text = tuong.TenViet;
                    this.TxtDiaChi.Text = tuong.DiaChi;
                }
                else
                {
                    this.TxtNguoiNhan.Text = tuong.TenAnh;
                    this.TxtDiaChi.Text = tuong.DiaChi;
                }
            }
        }

        internal virtual ADVObjects AdvNganhang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvNganhang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvNganhang = value;
            }
        }

        internal virtual ADVAccount AdvTaiKhoan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTaiKhoan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                ADVAccount.ValueChangedEventHandler handler = new ADVAccount.ValueChangedEventHandler(this.AdvTaiKhoan_ValueChanged);
                if (this._AdvTaiKhoan != null)
                {
                    this._AdvTaiKhoan.ValueChanged -= handler;
                }
                this._AdvTaiKhoan = value;
                if (this._AdvTaiKhoan != null)
                {
                    this._AdvTaiKhoan.ValueChanged += handler;
                }
            }
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.C1DockingTab1_SelectedIndexChanged);
                if (this._C1DockingTab1 != null)
                {
                    this._C1DockingTab1.SelectedIndexChanged -= handler;
                }
                this._C1DockingTab1 = value;
                if (this._C1DockingTab1 != null)
                {
                    this._C1DockingTab1.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual C1DockingTab C1DockingTab2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab2 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage2 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage3 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage4 = value;
            }
        }

        internal virtual ComboBox CboLoaiDuLieu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiDuLieu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiDuLieu = value;
            }
        }

        internal virtual MultiColumnComboBox CboLoaiHoaDon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiHoaDon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiHoaDon_DropDownClosed);
                if (this._CboLoaiHoaDon != null)
                {
                    this._CboLoaiHoaDon.DropDownClosed -= handler;
                }
                this._CboLoaiHoaDon = value;
                if (this._CboLoaiHoaDon != null)
                {
                    this._CboLoaiHoaDon.DropDownClosed += handler;
                }
            }
        }

        internal virtual ComboBox CboLoaiTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiTien_SelectedIndexChanged);
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged -= handler;
                }
                this._CboLoaiTien = value;
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdAdd
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAdd_Click);
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click -= handler;
                }
                this._CmdAdd = value;
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click += handler;
                }
            }
        }

        internal virtual Button CmdAddChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAddChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAddChungTu_Click);
                if (this._CmdAddChungTu != null)
                {
                    this._CmdAddChungTu.Click -= handler;
                }
                this._CmdAddChungTu = value;
                if (this._CmdAddChungTu != null)
                {
                    this._CmdAddChungTu.Click += handler;
                }
            }
        }

        internal virtual Button CmdAddRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAddRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAddRow_Click);
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click -= handler;
                }
                this._CmdAddRow = value;
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click += handler;
                }
            }
        }

        internal virtual Button CmdChuyen
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdChuyen;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdChuyen = value;
            }
        }

        internal virtual ToolStripButton CmdDel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDel_Click);
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click -= handler;
                }
                this._CmdDel = value;
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click += handler;
                }
            }
        }

        internal virtual Button CmdDelRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDelRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDelRow_Click);
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click -= handler;
                }
                this._CmdDelRow = value;
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdEdit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdEdit_Click);
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click -= handler;
                }
                this._CmdEdit = value;
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdFind
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdFind;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdFind_Click);
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click -= handler;
                }
                this._CmdFind = value;
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdHelp
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdHelp;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdHelp = value;
            }
        }

        internal virtual ToolStripSplitButton CmdPrint
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdPrint;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdPrint_ButtonClick);
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.ButtonClick -= handler;
                }
                this._CmdPrint = value;
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.ButtonClick += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdSave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdSave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdSave_Click);
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click -= handler;
                }
                this._CmdSave = value;
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdUnsave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdUnsave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdUnsave_Click);
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click -= handler;
                }
                this._CmdUnsave = value;
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click += handler;
                }
            }
        }

        public bool EnabledControl
        {
            get
            {
                return this.mEnabledControl;
            }
            set
            {
                this.mEnabledControl = value;
                this.CmdAdd.Enabled = !value & this.mAllowAdd;
                this.CmdEdit.Enabled = !value & this.mAllowEdit;
                this.CmdSave.Enabled = value;
                this.CmdUnsave.Enabled = value;
                this.CmdDel.Enabled = !value & this.mAllowDel;
                this.CmdFind.Enabled = !value;
                this.CmdExit.Enabled = !value;
                this.CmdAddRow.Enabled = value;
                this.CmdDelRow.Enabled = value;
                this.CmdPrint.Enabled = !value;
                this.TxtSoChungTu.ReadOnly = !value;
                this.TxtNgayChungTu.Enabled = value;
                this.CboLoaiTien.Enabled = value;
                this.txtTyGia.ReadOnly = !value;
                this.TxtDienGiai.ReadOnly = !value;
                this.TxtNguoiNhan.ReadOnly = !value;
                this.TxtDiaChi.ReadOnly = !value;
                this.TxtSoCMND.ReadOnly = !value;
                this.TxtChungTuDinhKem.ReadOnly = !value;
                this.AdvTaiKhoan.ReadOnly = !value;
                this.AdvNganhang.ReadOnly = !value;
                this.CboLoaiDuLieu.Enabled = value;
                this.CmdChuyen.Enabled = !value;
            }
        }

        internal virtual ImageList ImageList1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ImageList1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ImageList1 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label10
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label10;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label10 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label17
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label17;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label17 = value;
            }
        }

        internal virtual Label Label18
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label18;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label18 = value;
            }
        }

        internal virtual Label Label19
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label19;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label19 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label9
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label9;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label9 = value;
            }
        }

        internal virtual ToolStripMenuItem mnGiayBaoNo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._mnGiayBaoNo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.mnGiayBaoNo_Click);
                if (this._mnGiayBaoNo != null)
                {
                    this._mnGiayBaoNo.Click -= handler;
                }
                this._mnGiayBaoNo = value;
                if (this._mnGiayBaoNo != null)
                {
                    this._mnGiayBaoNo.Click += handler;
                }
            }
        }

        internal virtual ToolStripMenuItem mnUyNhiemChi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._mnUyNhiemChi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.mnUyNhiemChi_Click);
                if (this._mnUyNhiemChi != null)
                {
                    this._mnUyNhiemChi.Click -= handler;
                }
                this._mnUyNhiemChi = value;
                if (this._mnUyNhiemChi != null)
                {
                    this._mnUyNhiemChi.Click += handler;
                }
            }
        }

        internal virtual Panel Panel4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel4 = value;
            }
        }

        internal virtual Panel Panel5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel5 = value;
            }
        }

        internal virtual Panel PNDungChung
        {
            [DebuggerNonUserCode]
            get
            {
                return this._PNDungChung;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._PNDungChung = value;
            }
        }

        internal virtual ToolStrip ToolStrip1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStrip1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStrip1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripButton1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator3 = value;
            }
        }

        internal virtual TextBox TxtChungTuDinhKem
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtChungTuDinhKem;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtChungTuDinhKem = value;
            }
        }

        internal virtual TextBox TxtDiaChi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDiaChi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDiaChi = value;
            }
        }

        internal virtual TextBox TxtDienGiai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDienGiai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtDienGiai_LostFocus);
                if (this._TxtDienGiai != null)
                {
                    this._TxtDienGiai.LostFocus -= handler;
                }
                this._TxtDienGiai = value;
                if (this._TxtDienGiai != null)
                {
                    this._TxtDienGiai.LostFocus += handler;
                }
            }
        }

        internal virtual DateTimePicker TxtNgayChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayChungTu = value;
            }
        }

        internal virtual DateTimePicker TxtNgayHoaDon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayHoaDon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayHoaDon = value;
            }
        }

        internal virtual TextBox TxtNguoiNhan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNguoiNhan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNguoiNhan = value;
            }
        }

        internal virtual TextBox TxtSoChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoChungTu = value;
            }
        }

        internal virtual TextBox TxtSoCMND
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoCMND;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoCMND = value;
            }
        }

        internal virtual C1NumericEdit TxtSoTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoTien = value;
            }
        }

        internal virtual C1NumericEdit TxtSoTienNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoTienNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoTienNT = value;
            }
        }

        internal virtual C1NumericEdit txtTyGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTyGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtTyGia = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSlist_CellButtonClick);
                RowColEventHandler handler2 = new RowColEventHandler(this.VSlist_AfterEdit);
                RowColEventHandler handler3 = new RowColEventHandler(this.VSlist_BeforeEdit);
                if (this._VSlist != null)
                {
                    this._VSlist.CellButtonClick -= handler;
                    this._VSlist.AfterEdit -= handler2;
                    this._VSlist.BeforeEdit -= handler3;
                }
                this._VSlist = value;
                if (this._VSlist != null)
                {
                    this._VSlist.CellButtonClick += handler;
                    this._VSlist.AfterEdit += handler2;
                    this._VSlist.BeforeEdit += handler3;
                }
            }
        }
    }
}

